package com.zlj.proj;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        final ScrollView sv = (ScrollView)findViewById(R.id.sv);
        final Button btnNext = (Button)findViewById(R.id.btn_next);
        final Button btnPrev = (Button)findViewById(R.id.btn_prev);
        btnNext.setOnClickListener(new OnClickListener(){
			
			@Override
			public void onClick(View v){
				sv.moveToNext();
			}
		});
        btnPrev.setOnClickListener(new OnClickListener(){
			
			@Override
			public void onClick(View v){
				sv.moveToPrev();
			}
		});
    }
}